package com.apes.auto.car.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @ClassName WheelHubSpecifications
 * @Description TODO
 * @Author pengyb
 * @Date 2019/7/11 17:48
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = WheelHubSpecifications.CONST_TABLE_NAME, indexes = {
        @Index(columnList = "tire_width")
})
public class WheelHubSpecifications extends Model {
    public static final String CONST_TABLE_NAME = "dc_wheel_hub_specifications";
    @Id
    @Column(name = "id", length = 16)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "轮毂规格换算对照表")
    private String id;

    @Column(name = "tire_width")
    @Comment("最佳胎宽")
    private String tireWidth;

    @Column(name = "whee_hub_width")
    @Comment("轮毂宽度")
    private String wheeHubWidth;


}
